package ro.cityprojects.adminloc.entities;

import javax.persistence.*;

/**
 * BillReport class
 *
 * @author bogdan.solga
 *
 * Date: 13.06.2013, time: 17:47
 */
@Entity
@javax.persistence.IdClass(ro.cityprojects.adminloc.entities.BillReportPK.class)
@javax.persistence.Table(name = "BILL_REPORT")
public class BillReport {

    @Id
    @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
    @JoinColumn(name = "REPORT_ID", nullable = false, insertable = true, updatable = true)
    private Report report;

    public Report getReport() {
        return report;
    }

    public void setReport(Report report) {
        this.report = report;
    }

    @Id
    @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
    @JoinColumn(name = "BILL_ID", nullable = false, insertable = true, updatable = true)
    private Bill bill;

    public Bill getBill() {
        return bill;
    }

    public void setBill(Bill bill) {
        this.bill = bill;
    }
}
